<?php

use think\migration\Seeder;

class Admin extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $data = [
            [
                'username' => 'admin',
                'password' => md5(sha1(111111)),
                'mobile' => '18888888888',
                'nickname'=>'超级账户',
                'portrait' => '/static/admin/images/a1.jpg',
                'email'=>'18888888888@139.com',
                'last_login_time' => date('Y-m-d H:i:s'),
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ]
        ];
        $admin = $this->table('admins');
        $admin->insert($data)
            ->save();
    }
}